
import MaterialProperty from '../../MaterialProperty'
/**
 * 墙体静态渐变色
 */

export default class StaticWallMaterialProperty extends MaterialProperty {
  constructor(options = {}) {
    super(options)
  }

  // 获取类型
  getType(time) {
    return Cesium.Material.StaticWallMaterialType
  }

  getValue(time, result) {
    if (!result) {
      result = {}
    }
    result.color = Cesium.Property.getValueOrUndefined(this.color, time)
    result.speed = Cesium.Property.getValueOrUndefined(this.speed, time)
    return result
  }

  equals(other) {
    return this === other
  }
}

Object.defineProperties(StaticWallMaterialProperty.prototype, {
  color: Cesium.createPropertyDescriptor('color'),
  speed: Cesium.createPropertyDescriptor('speed')
})

